package com.mlnx.bluwifi.utils;

/**
 * @author zzb
 * @create 2019/10/30 9:06
 */
public class SpolanyaUtils {
    /**
     * 开启扫描
     */
    public static String scan="http://192.168.1.108/gap/nodes/?mac=CC:1B:E0:E1:4B:E4&access_token=&active=1&event=1&chip=0";
    /**
     * 连接设备
     */
    public static String connect="http://192.168.1.108/gap/nodes/00:A0:50:3E:1B:E9/connection/";
    /**
     * 已连接设备
     */
    public static String connectDevice="http://192.168.1.108/gap/nodes/";
    /**
     * 发现服务
     */
    public static String findServer="http://192.168.1.108/gatt/nodes/00:A0:50:3E:1B:E9/services/characteristics/descriptors?mac=CC:1B:E0:E1:4B:E4&access_token=";
    /**
     * 写入指令
     */
    public static String inputCmd="http://192.168.1.108/gatt/nodes/00:A0:50:3E:1B:E9/handle/15/value/0100/";
    /**
     * 接收设备信息
     */
    public static String receiveDeviceInfo="http://192.168.1.108/gatt/nodes/?mac=CC:1B:E0:E1:4B:E4&event=1&access_token=";


    public static String  getConnectUrl(String spoMac, String ip){
        return "http://"+ip+"/gap/nodes/"+spoMac+"/connection/";
    }


    public static String delConnectUrl(String spoMac, String ip){
        return "http://"+ip+"/gap/nodes/"+spoMac+"/connection/";
    }

    public static String  getScanUrl(String mac , String ip){
        return "http://"+ip+"/gap/nodes/?mac="+mac+"&access_token=&active=1&event=1&chip=0";
    }

    public static String  getInputCmdUrl(String spoMac, String ip){
        return "http://"+ip+"/gatt/nodes/"+spoMac+"/handle/15/value/0100/";
    }

    public static String  getEcgInputCmdUrl(String spoMac, String ip){
        return "http://"+ip+"/gatt/nodes/"+spoMac+"/handle/34/value/0100/";
    }
    public static String  getReceiveDeviceInfo(String mac, String ip){
        return "http://"+ip+"/gatt/nodes/?mac="+mac+"&event=1&access_token=";
    }

    public static String  getConnectDevice(String ip){
        return "http://"+ip+"/gap/nodes/";
    }

    public static String  getXiaolouInputCmdUrl(String spoMac, String ip){
        return "http://"+ip+"/gatt/nodes/"+spoMac+"/handle/16/value/0100/";
    }

    public static String  getYouRBPInputCmdUrl(String spoMac, String ip){
        return "http://"+ip+"/gatt/nodes/"+spoMac+"/handle/74/value/0100/";
    }


}